I've been stuck with that for a while and all other solutions I tried do not give me any good results.
I'm running docker on Windows 11.
Here is how my Dockerfile currently is:
FROM node
RUN mkdir -p /home/node/app && chown -R node:node /home/node/app
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
WORKDIR /home/node/app
USER node
COPY --chown=node:node package.json .
COPY --chown=node:node . .
RUN npm install
CMD ["node", "js/main.js"]
And it still gives me a permission error! I'm out of ideas and my friends do not know how to help me either.